package org.example;

import org.apache.flink.util.Collector;

import java.util.List;

/**
 * 自定义收集器，用于测试
 */
public class ListCollector<T> implements Collector<T> {
    private final List<T> list;

    ListCollector(List<T> list) {
        this.list = list;
    }

    @Override
    public void collect(T record) {
        list.add(record);
    }

    @Override
    public void close() {
        // 不需要实现
    }
}
